var t = require;
var e = module;
var o = exports;
var a,
    i =
        (this && this.__extends) ||
        ((a = function (t, e) {
            return (a =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                })(t, e);
        }),
        function (t, e) {
            a(t, e);
            function o() {
                this.constructor = t;
            }
            t.prototype = null === e ? Object.create(e) : ((o.prototype = e.prototype), new o());
        }),
    n =
        (this && this.__decorate) ||
        function (t, e, o, a) {
            var i,
                n = arguments.length,
                r = n < 3 ? e : null === a ? (a = Object.getOwnPropertyDescriptor(e, o)) : a;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, a);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (i = t[s]) && (r = (n < 3 ? i(r) : n > 3 ? i(e, o, r) : i(e, o)) || r);
            return n > 3 && r && Object.defineProperty(e, o, r), r;
        };
Object.defineProperty(o, "__esModule", {value: !0});
var r = t("UIConfig"),
    s = t("UIManager"),
    c = cc._decorator,
    p = c.ccclass,
    l = c.property,
    d =
        (c.menu,
        (function () {
            function t() {
                this.avgDur = 0;
                this.alpha = 0.01;
                this.frameCount = 0;
                this.fps = 0;
            }
            t.prototype.update = function (t) {
                this.frameCount++;
                this.avgDur = 1 == this.frameCount ? t : this.avgDur * (1 - this.alpha) + t * this.alpha;
                this.fps = 1 / this.avgDur;
            };
            t.prototype.getFps = function () {
                return Math.floor(100 * this.fps) / 100;
            };
            return t;
        })()),
    u = (function (t) {
        i(e, t);
        function e() {
            var e = (null !== t && t.apply(this, arguments)) || this;
            e.btn_color = cc.Color.GREEN;
            e.set_btn_color = new cc.Color(180, 180, 180, 255);
            e.node_btn_color = cc.Color.ORANGE;
            e.fpsCom = new d();
            e.allBtnList = [];
            e.setList = [];
            e.NextList = [];
            e.allpoolerbtnnode = [];
            e.allNowSelNode = [];
            e.btnline = 50;
            e.isview = !1;
            e.tempClickCallBack = null;
            e.keyboard = {};
            e.valueinfo = {};
            e.viewinfo = {};
            e.bgnode = null;
            e.nowselnode = null;
            e.btncon = null;
            e.content = null;
            e.tipLab = null;
            return e;
        }
        e.prototype.onEnable = function () {
            var t = this.node.convertToWorldSpaceAR(cc.Vec3.ZERO),
                e = cc.Canvas.instance.node;
            this.node.parent = e;
            this.node.position = e.convertToNodeSpaceAR(t);
            this.node.zIndex = 50;
        };
        e.prototype.onLoad = function () {
            console.log(
                "QDebug ----------------- ",
                cc.sys.localStorage.getItem("ggdbug"),
                "95stalk" == cc.sys.localStorage.getItem("ggdbug")
            );
            "95stalk" == cc.sys.localStorage.getItem("ggdbug") ? (this.node.active = !0) : (this.node.active = !1);
            window.stalk_hidedebug = this;
            this.NextList = new Array();
        };
        e.prototype.setInfoBtn = function () {
            var t = this;
            this.setDDBtn(
                this.colorStr("猪猪银行钻石增加400", this.btn_color),
                function () {
                    PayData.addPropZs(400);
                },
                300
            );
            this.setDDBtn(
                this.colorStr("增加大量金", this.btn_color),
                function () {
                    CacheDataManager.addGameC("9999999999999999999999999999999999999999999");
                },
                300
            );
            this.setDDBtn(
                this.colorStr("增加小量量金", this.btn_color),
                function () {
                    CacheDataManager.addGameC("999");
                },
                300
            );
            this.setDDBtn(
                this.colorStr("增加1000钻石", this.btn_color),
                function () {
                    GameDataValue.setPropCount(3, GameDataValue.getPropCount(3) + 1e3);
                    CacheDataManager.updateCostDataView = !0;
                },
                300
            );
            this.setDDBtn(
                this.colorStr("刷新礼包购买", this.btn_color),
                function () {
                    GameDataValue.clearBuyShopItem();
                },
                300
            );
            this.setDDBtn(
                this.colorStr("切换升级设备速度", this.btn_color),
                function () {
                    CacheDataManager.uplevelToFra = !CacheDataManager.uplevelToFra;
                    s.default.open(r.UIID.UIToast, {msg: "当前状态:" + CacheDataManager.uplevelToFra});
                },
                300
            );
            this.setDDBtn(
                this.colorStr("新的一天", this.btn_color),
                function () {
                    GameDataValue.newDay();
                    PayData.newDay();
                    PlayerData.getSaveData();
                    s.default.open(r.UIID.UIToast, {msg: "退出游戏重新进来生效"});
                },
                300
            );
            this.setDDBtn(
                this.colorStr("显示广告测试", this.btn_color),
                function () {
                    AdView.showRewardVedioAd(function () {}, "6", "debug");
                },
                300
            );
            this.setDDBtn(
                this.colorStr("关闭调试", this.btn_color),
                function () {
                    t.node.active = !1;
                    cc.sys.localStorage.setItem("ggdbug", "0");
                },
                300
            );
            this.setDDBtn(
                this.colorStr("打开虚拟广告", this.btn_color),
                function () {
                    CacheDataManager.debugAd = !0;
                    cc.sys.localStorage.setItem("debug", "0");
                },
                300
            );
            this.setDDBtn(
                this.colorStr("设置为汽车测试关卡", this.btn_color),
                function () {
                    GameDataValue.setSelLv(5);
                },
                300
            );
            this.setDDBtn(
                this.colorStr("设置成第二章第一关", this.btn_color),
                function () {
                    GameDataValue.setSelLv(7);
                },
                300
            );
            this.setDDBtn(
                this.colorStr("关闭虚拟广告", this.btn_color),
                function () {
                    CacheDataManager.debugAd = !1;
                    cc.sys.localStorage.setItem("debug", "0");
                },
                300
            );
        };
        e.prototype.addBg = function () {
            if (!this.bgnode) {
                var t = new cc.Node("bg");
                t.parent = this.node;
                t.position = cc.v3(-100, 20, 0);
                t.color = cc.Color.BLACK;
                var e = t.addComponent(cc.Sprite);
                this.loadDefSp(function (o) {
                    e.spriteFrame = o;
                    t.color = cc.Color.BLACK;
                    t.anchorX = 0;
                    t.anchorY = 1;
                    t.opacity = 200;
                    t.width = 0;
                    t.height = 0;
                });
                this.bgnode = t;
            }
        };
        e.prototype.loadDefSp = function () {};
        e.prototype.colorStr = function (t, e) {
            return "<color=#" + e.toHEX() + ">" + t + "</c>";
        };
        e.prototype.makeScroll = function (t, e, o, a) {
            void 0 === a && (a = 2 * cc.winSize.width);
            var i = new cc.Node(t);
            this.setList.push(i);
            i.parent = this.node;
            i.position = e;
            var n = i.addComponent(cc.ScrollView);
            n.horizontal = !1;
            n.vertical = !0;
            var r = new cc.Node("mask");
            r.addComponent(cc.Mask);
            r.parent = i;
            r.position = cc.Vec3.ZERO;
            var s = new cc.Node("content");
            s.parent = r;
            s.position = cc.Vec3.ZERO;
            n.content = s;
            i.color = cc.Color.BLACK;
            i.anchorX = 0;
            i.anchorY = 1;
            r.anchorX = 0.5;
            r.anchorY = 1;
            r.width = a;
            s.width = 500;
            s.anchorY = 1;
            r.height = o;
            i.width = r.width;
            i.height = r.height;
            s.width = 50;
            i.active = !1;
            return s;
        };
        e.prototype.addScrollDDView = function () {
            this.btncon = this.makeScroll("Btn2", cc.v2(0, -500), 200);
        };
        e.prototype.setDDBtn = function (t, e, o) {
            void 0 === o && (o = 130);
            this.addBtn(cc.v2(this.tempintpos.x, this.tempintpos.y), t, e, this.node, this.btncon);
            this.tempintpos.x += o;
            if (this.tempintpos.x >= 500) {
                this.tempintpos.x = 0;
                this.tempintpos.y -= this.btnline;
                this.btncon.height += this.btnline + 10;
            }
        };
        e.prototype.setStrInfo = function (t) {
            this.viewinfo.str.string = t;
            this.viewinfo.con.height = this.viewinfo.str.node.height;
        };
        e.prototype.Adp = function () {
            var t = cc.v3(100, cc.winSize.height);
            t.addSelf(cc.v3(0, -400));
            this.node.position = this.node.parent.convertToNodeSpaceAR(t);
            var e = new cc.Node("break");
            e.parent = this.node;
            e.addComponent(cc.BlockInputEvents);
            e.position = this.node.convertToNodeSpaceAR(cc.v3(cc.winSize.width / 2, cc.winSize.height / 2));
            e.width = cc.winSize.width;
            e.height = cc.winSize.height;
            e.active = !1;
            var o = new cc.Node("lab");
            o.setPosition(cc.v2(0, 200));
            o.parent = this.node;
            o.anchorX = 0;
            o.color = cc.Color.GREEN;
            this.tipLab = o.addComponent(cc.Label);
            this.tipLab.enableBold = !0;
            this.tipLab.string = "fps";
            this.setList.push(e);
        };
        e.prototype.setGroup = function (t) {
            t.group = this.node.group;
            console.log("QDebug ----------------- ", this.node.group);
        };
        e.prototype.viewNow = function () {
            var t = this;
            if (this.nowselnode) {
                var e = "";
                if (this.nowselnode.parent) {
                    var o = this.nowselnode.parent.children;
                    this.addBtn(
                        cc.v3(-60, 1 * this.btnline - 100),
                        "返回父级",
                        function (e, o) {
                            o && o.isValid ? (t.nowselnode = o.parent) : (t.nowselnode = t.node);
                            t.clearAll();
                            t.viewNow();
                        },
                        this.nowselnode
                    );
                    for (var a = 0; a < o.length && o.length; a++) {
                        var i = o[a];
                        this.setBtn(
                            cc.v2(10, -80 - this.btnline * (a + 0.5)),
                            this.getNodeInfo(i),
                            function (e, o) {
                                if (o.children.length > 0) {
                                    t.nowselnode = o.children[0];
                                    t.clearAll();
                                    t.viewNow();
                                }
                            },
                            i
                        );
                        e += this.parseInfo(i);
                    }
                } else {
                    this.setBtn(
                        cc.v2(10, -100 + (this.btnline + 1)),
                        this.getNodeInfo(this.nowselnode),
                        function (e, o) {
                            if (o.children.length > 0) {
                                t.nowselnode = o.children[0];
                                t.clearAll();
                                t.viewNow();
                            }
                        },
                        this.nowselnode
                    );
                    e += this.parseInfo(this.nowselnode);
                }
                this.setStrInfo(e);
            }
        };
        e.prototype.getNodeInfo = function (t) {
            return this.colorStr(t.name + "-" + t.childrenCount, this.node_btn_color);
        };
        e.prototype.addSetBtn = function () {
            var t = this;
            if (!this.viewinfo.setbtninfo) {
                this.valueinfo = {};
                this.valueinfo.k = "-1";
                var e = this.makeScroll("setbtnScroll", cc.v2(0, 0), 500, 1e3);
                this.viewinfo.setbtninfo = e;
                var o = function (e, o, a) {
                    t.viewinfo.basestr = "name:" + t.nowselnode.name + "\t" + e + ":" + o;
                    t.viewinfo.oldvalue = o;
                    t.valueinfo.k = a;
                    t.makeKeyBoard();
                    t.setStrInfo(t.viewinfo.basestr + "\n");
                };
                this.addBtn(
                    cc.v2(0, -25),
                    "设置X",
                    function () {
                        o("x", t.nowselnode.x, "0");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -75),
                    "设置Y",
                    function () {
                        o("y", t.nowselnode.y, "1");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -125),
                    "设置width",
                    function () {
                        o("width", t.nowselnode.width, "2");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -175),
                    "设置height",
                    function () {
                        o("height", t.nowselnode.height, "3");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -225),
                    "设置scaleX",
                    function () {
                        o("scaleX", t.nowselnode.scaleX, "4");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -275),
                    "设置scaleY",
                    function () {
                        o("scaleY", t.nowselnode.scaleY, "5");
                    },
                    this.node,
                    e
                );
                this.addBtn(
                    cc.v2(0, -325),
                    "设置rotation",
                    function () {
                        o("rotation", t.nowselnode.angle, "0");
                    },
                    this.node,
                    e
                );
                this.viewinfo.setbtninfo.parent.parent.x += 0.5 * cc.winSize.width;
            }
            this.viewinfo.oldvalue = "";
            this.viewinfo.setbtninfo.parent.parent.active = !0;
        };
        e.prototype.setBtnListener = function (t) {
            switch (this.valueinfo.k + "") {
                case "0":
                    this.nowselnode.x = t;
                    break;
                case "1":
                    this.nowselnode.y = t;
                    break;
                case "2":
                    this.nowselnode.width = t;
                    break;
                case "3":
                    this.nowselnode.height = t;
                    break;
                case "4":
                    this.nowselnode.scaleX = t;
                    break;
                case "5":
                    this.nowselnode.scaleY = t;
                    break;
                case "6":
                    this.nowselnode.angle = t;
                    break;
                case "7":
                    break;
                case "click":
                    if (this.tempClickCallBack) {
                        this.tempClickCallBack(t);
                        this.tempClickCallBack = null;
                    }
            }
            this.setStrInfo(this.viewinfo.basestr + "\n>>>>" + t);
        };
        e.prototype.closeSet = function () {
            this.viewinfo.setbtninfo && (this.viewinfo.setbtninfo.parent.parent.active = !1);
        };
        e.prototype.parseInfo = function (t) {
            var e = t._components,
                o =
                    "<color=#2200ff>" +
                    t.name +
                    "</c>\t<color=#ffffff>" +
                    t.active +
                    "</c>\n<color=#B83636>w:" +
                    t.width +
                    "h:" +
                    t.height +
                    "</c>\t\t<color=#B83636>x:" +
                    t.x +
                    "y:" +
                    t.y +
                    "</c>\n<color=#B83636>anchorX:" +
                    t.anchorX +
                    "anchorY:" +
                    t.anchorY +
                    "</c>\n";
            o +=
                "<color=#B83636>scaleX:" +
                t.scaleX +
                "scaleY:" +
                t.scaleY +
                "</c><color=#B83636>\t\t rotation:" +
                t.angle +
                "</c>\n";
            e.forEach(function (t) {
                o += "<color=#DF3B3B>" + cc.js.getClassName(t) + ":" + t.enabled + "</c>\n";
            });
            o += "子节点:\n";
            t.children.forEach(function (t) {
                o += t.name + "\n";
            });
            return (o += "\n");
        };
        e.prototype.clearAll = function () {
            var t = this;
            this.allBtnList.forEach(function (e) {
                t.RecNode(e);
            });
            this.allBtnList.length = 0;
        };
        e.prototype.openDlg = function () {
            var t = this;
            this.allNowSelNode = new Array();
            this.NextList.push(function () {
                t.Adp();
            });
            this.NextList.push(function () {
                t.addBg();
            });
            this.NextList.push(function () {
                t.addStartBtn();
            });
            this.NextList.push(function () {
                t.addScrollView();
            });
        };
        e.prototype.setBtn = function (t, e, o, a) {
            var i = this;
            if (a !== this.node) {
                this.addBtn(
                    t.add(cc.v3(-70, 0)),
                    this.colorStr("设置", this.set_btn_color),
                    function (t, e) {
                        i.clearAll();
                        i.nowselnode = e;
                        i.setBaseNode(e);
                        i.addSetBtn();
                    },
                    a
                );
                this.addBtn(t, e, o, a);
            }
        };
        e.prototype.setBaseNode = function (t) {
            var e = this,
                o = t._components,
                a = 0;
            this.addBtn(
                cc.v2(-70, -100 - -0.5 * this.btnline),
                this.colorStr(t.active ? "关闭" : "打开", this.set_btn_color),
                function (o) {
                    if (t.getComponent("QDebug") !== e) {
                        t.active = !t.active;
                        o.getComponent(cc.RichText).string = e.colorStr(t.active ? "关闭" : "打开", e.set_btn_color);
                    }
                },
                t
            );
            this.addBtn(
                cc.v2(10, -100 - -0.5 * this.btnline),
                this.colorStr(t.name, this.node_btn_color),
                function (t, o) {
                    e.setStrInfo(e.parseInfo(o));
                },
                t
            );
            o.forEach(function (o) {
                e.addBtn(
                    cc.v2(-70, -100 - e.btnline * (a + 0.5)),
                    e.colorStr(o.enabled ? "关闭" : "打开", e.node_btn_color),
                    function (t) {
                        if (o !== e) {
                            o.enabled = !o.enabled;
                            t.getComponent(cc.RichText).string = e.colorStr(
                                o.enabled ? "关闭" : "打开",
                                e.node_btn_color
                            );
                        }
                    },
                    t
                );
                e.addBtn(
                    cc.v2(10, -100 - e.btnline * (a + 0.5)),
                    e.colorStr(cc.js.getClassName(o), e.node_btn_color),
                    function (t, o) {
                        e.setStrInfo(e.parseInfo(o));
                    },
                    t
                );
                a++;
            });
            this.addBtn(
                cc.v2(-70, -100 - this.btnline * (a + 0.5)),
                this.colorStr("返回", this.set_btn_color),
                function () {
                    e.closeSet();
                    e.clearAll();
                    e.viewNow();
                },
                t
            );
        };
        e.prototype.addBtn = function (t, e, o, a, i) {
            var n = this;
            void 0 === i && (i = null);
            var r = this.getNewBtnNode();
            this.NextList.push(function () {
                r.active = !0;
                r.zIndex = 100;
                r.position = t;
                r.parent = i || n.content;
                r.anchorX = 0;
                r.height = 20;
                var s = n.checkRichText(r);
                s.fontSize = 30;
                s.string = e;
                n.checkBtn(r).transition = cc.Button.Transition.SCALE;
                r.height = 30;
                r.on("click", function () {
                    o(r, a);
                });
                n.content.height = n.btnline * (n.allBtnList.length / 2 + 2);
            });
            i || this.allBtnList.push(r);
            return r;
        };
        e.prototype.addStartBtn = function () {
            var t = this;
            this.isview = !0;
            this.addBtn(
                cc.Vec2.ZERO,
                this.colorStr("显示", this.btn_color),
                function (e) {
                    e.getComponent(cc.RichText).string = t.colorStr(t.isview ? "隐藏" : "显示", t.btn_color);
                    t.isview = !t.isview;
                    if (t.isview) {
                        t.bgnode.width = 0;
                        t.bgnode.height = 0;
                        t.setList.forEach(function (t) {
                            t.active = !1;
                        });
                        t.clearAll();
                    } else {
                        (t.nowselnode && t.nowselnode.isValid) || (t.nowselnode = t.node);
                        t.bgnode.width = 800;
                        t.bgnode.height = 1200;
                        t.setList.forEach(function (t) {
                            t.active = !0;
                        });
                        t.viewNow();
                    }
                },
                this.node,
                this.node
            );
            this.addScrollDDView();
            this.btncon.height = this.btnline;
            this.tempintpos = cc.v3(0, -this.btnline);
            this.setInfoBtn();
            this.allBtnList.length = 0;
        };
        e.prototype.addScrollView = function () {
            var t = new cc.Node("ScrollView");
            t.parent = this.node;
            t.position = cc.v3(0, 340);
            t.color = cc.Color.BLACK;
            var e = t.addComponent(cc.ScrollView);
            e.horizontal = !1;
            e.vertical = !0;
            var o = new cc.Node("mask");
            o.addComponent(cc.Mask);
            o.parent = t;
            o.position = cc.Vec3.ZERO;
            var a = new cc.Node("content");
            a.parent = o;
            a.position = cc.Vec3.ZERO;
            e.content = a;
            var i = new cc.Node("Label");
            i.parent = a;
            i.position = cc.Vec3.ZERO;
            var n = i.addComponent(cc.RichText);
            n.fontSize = 30;
            this.viewinfo = {};
            this.viewinfo.str = n;
            this.viewinfo.con = a;
            this.setList.push(t);
            var r = t.addComponent(cc.Sprite);
            this.loadDefSp(function (e) {
                r.spriteFrame = e;
                t.color = cc.Color.BLACK;
                t.anchorX = 0;
                t.anchorY = 1;
                o.anchorX = 0;
                o.anchorY = 1;
                i.anchorX = 0;
                i.anchorY = 1;
                t.opacity = 200;
                o.width = 500;
                a.width = 500;
                a.anchorY = 1;
                n.maxWidth = a.width;
                o.height = 300;
                t.width = o.width;
                t.height = o.height;
                a.width = 50;
            });
            t.active = !1;
            this.addScrollBGView();
        };
        e.prototype.addScrollBGView = function () {
            this.content = this.btncon = this.makeScroll("BG2", cc.v3(0, 0), 500);
        };
        e.prototype.getNewBtnNode = function () {
            this.allpoolerbtnnode || (this.allpoolerbtnnode = new Array());
            return this.allpoolerbtnnode.length > 0 ? this.allpoolerbtnnode.pop() : new cc.Node("btn");
        };
        e.prototype.RecNode = function (t) {
            this.allpoolerbtnnode.push(t);
            t.off("click");
            t.active = !1;
        };
        e.prototype.checkBtn = function (t) {
            var e = t.getComponent(cc.Button);
            e || (e = t.addComponent(cc.Button));
            return e;
        };
        e.prototype.checkRichText = function (t) {
            var e = t.getComponent(cc.RichText);
            e || (e = t.addComponent(cc.RichText));
            return e;
        };
        e.prototype.start = function () {
            this.setList = new Array();
            this.openDlg();
        };
        e.prototype.update = function (t) {
            if (this.NextList.length > 0) {
                this.NextList[0] && this.NextList[0]();
                this.NextList.shift();
            }
            this.fpsCom.update(t);
            this.tipLab.string = "fps:" + this.fpsCom.getFps();
        };
        e.prototype.makeKeyBoard = function () {
            var t = this;
            if (!this.keyboard) {
                this.keyboard = {};
                var e = cc.v2(cc.winSize.width, cc.winSize.height),
                    o = cc.v2(e.x, 300),
                    a = cc.v2(o.x / 4, o.y / 5),
                    i = new cc.Node("keyboard");
                i.parent = this.node;
                i.position = this.node.convertToNodeSpaceAR(cc.v3(e.x / 2, e.y / 2));
                i.width = e.x;
                i.height = e.y;
                this.checkBtn(i);
                var n = function () {
                    t.keyboard.keyboard.active = !1;
                };
                i.on("click", n);
                this.keyboard.keyboard = i;
                var r = "";
                this.loadDefSp(function (s) {
                    var c = function (e) {
                            switch (e) {
                                case "关闭":
                                    n();
                                    break;
                                case "确定":
                                    if ("" != r) {
                                        var o = "";
                                        if ("-" == r[0]) {
                                            o = "-";
                                            r = r.substr(1, r.length);
                                        }
                                        if (r.length > 0) {
                                            for (
                                                var a = 0;
                                                a < r.length && !("-" == r[a] || ("." == r[a] && o.indexOf(".") >= 0));
                                                a++
                                            )
                                                o += r[a];
                                            o.length > 0 && "." == o[o.length - 1] && (o = o.substr(0, o.length - 1));
                                            r = o;
                                        } else r = "";
                                        if (r.length > 0) {
                                            t.setBtnListener(r);
                                            t.NextList.push(function () {
                                                r = "";
                                            });
                                        }
                                    }
                                    break;
                                case "退格":
                                    "" != r && (r = r.substr(0, r.length - 1));
                                    break;
                                case "重置":
                                    r = "";
                                    break;
                                case "撤销":
                                    (r = t.viewinfo.oldvalue + "").length > 0 && t.setBtnListener(t.viewinfo.oldvalue);
                                    break;
                                default:
                                    r += e;
                            }
                            t.setStrInfo(t.viewinfo.basestr + "\n" + r);
                        },
                        p = function (e, n) {
                            var r = cc.v3(a.x / 2 + (e % 4) * a.x, 40 + o.y - a.x / 2 - 0.8 * Math.floor(e / 4) * a.y),
                                s = new cc.Node(n);
                            s.parent = i;
                            s.position = i.convertToNodeSpaceAR(r);
                            s.width = a.x;
                            s.height = a.y;
                            s.on("click", function () {
                                c(n);
                            });
                            t.checkBtn(s).transition = cc.Button.Transition.SCALE;
                            var p = new cc.Node(n);
                            p.parent = s;
                            p.addComponent(cc.Label).string = n;
                        },
                        l = [
                            "1",
                            "2",
                            "3",
                            "确定",
                            "4",
                            "5",
                            "6",
                            "关闭",
                            "7",
                            "8",
                            "9",
                            "退格",
                            ".",
                            "0",
                            "-",
                            "重置",
                            "~",
                            "~",
                            "~",
                            "撤销"
                        ],
                        d = new cc.Node("bg"),
                        u = d.addComponent(cc.Sprite);
                    u.spriteFrame = s;
                    d.parent = i;
                    d.position = i.convertToNodeSpaceAR(cc.v3(e.x / 2, o.y / 2));
                    d.width = o.x;
                    d.height = o.y;
                    d.opacity = 150;
                    t.keyboard.bg = u;
                    for (var h = 0; h < l.length; h++) p(h, l[h]);
                });
            }
            this.keyboard.keyboard.active = !0;
        };
        n([l({displayName: "按钮名称"})], e.prototype, "btn_color", void 0);
        n([l({displayName: "设置按钮"})], e.prototype, "set_btn_color", void 0);
        n([l({displayName: "节点按钮"})], e.prototype, "node_btn_color", void 0);
        return n([p], e);
    })(cc.Component);
o.default = u;
